package com.nt.train.enums;

import lombok.AllArgsConstructor;
import lombok.Data;

/**
 * @author hlf
 * @version 1.0
 * @date 2022/9/13 19:12
 */
@AllArgsConstructor
public enum ResultEnum implements IResult {

    SUCCESS(2001, "接口调用成功"),

    VALIDATE_FAILED(2002, "参数校验失败"),

    COMMON_FAILED(2003, "接口调用失败"),

    FORBIDDEN(2004, "没有权限访问资源");

    private Integer code;

    private String message;

    @Override
    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    @Override
    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }
}
